package cn.hjh.dao;

import cn.hjh.pojo.Employee;
import org.hibernate.Query;

import java.util.List;

public class EmployeeDao {
    public void save(Employee employee){
        HibernateUtil.currentSession().save(employee);
    }

    public List<Employee> findEmployee() {
        String hql = "from Employy";
        Query query = HibernateUtil.currentSession().createQuery(hql);
        return query.list();
    }
}
